home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Clean 1.2.4 / IOInterface / deltaDialog.dcl < prev    next >
Encoding:
Modula Definition  |  1997-04-25  |  4.6 KB  |  116 lines  |  [TEXT/3PRM]

  1. definition module deltaDialog;
  2.  
  3.  
  4. //    Version 0.8 to 1.0
  5.  
  6. //
  7. //    Module deltaDialog specifies all functions on dialogs. 
  8. //
  9.  
  10. import    deltaIOSystem;
  11. from    dialogDef    import DialogState, DialogInfo;
  12. from    ioState        import IOState;
  13.  
  14.  
  15. //    Functions applied on non-existent dialogs or unknown id are ignored.
  16.  
  17. ::    DialogChange *s :== (DialogState s (IOState s)) -> DialogState s (IOState s);
  18.  
  19.  
  20. /*    OpenDialog opens a modeless property or command dialog. */
  21.  
  22. OpenDialog            ::    !(DialogDef s (IOState s)) !(IOState s) -> IOState s;
  23.  
  24. /*    OpenModalDialog opens a modal CommandDialog. The function terminates when
  25.     the dialog is closed (by means of Close(Active)Dialog). */
  26.  
  27. OpenModalDialog        ::    !(DialogDef *s (IOState *s))
  28.                         !*s !(IOState *s) -> (!*s, !IOState *s);
  29.  
  30. /*    Close(Active)Dialog closes the indicated dialog. */
  31.  
  32. CloseDialog            ::    !DialogId    !(IOState s) -> IOState s;
  33. CloseActiveDialog    ::                !(IOState s) -> IOState s;
  34.  
  35. /*    OpenNotice opens a notice (which is always modal) and returns the id of the
  36.     selected notice button. */
  37.  
  38. OpenNotice            :: !NoticeDef !*s !(IOState *s) -> (!NoticeButtonId, !*s, !IOState *s);
  39.  
  40. /*    A Beep is the simplest kind of notice. */
  41.  
  42. Beep                :: !(IOState s) -> IOState s;
  43.  
  44. /*    Get(Active)DialogInfo returns the DialogInfo for the indicated dialog.
  45.     The boolean indicates whether the indicated dialog exists. When it is False
  46.     a dummy DialogInfo is returned. */ 
  47.  
  48. GetDialogInfo    :: !DialogId !(IOState s) -> (!Bool, !DialogInfo, !IOState s);
  49. GetActiveDialogInfo    :: !(IOState s) -> (!Bool, !DialogInfo, !IOState s);
  50.  
  51. /*    With the following function the state of dialog items can be changed.
  52.     When an id is specified of an item for which the state change is invalid
  53.     the functions have no effect. */
  54.  
  55. EnableDialogItems    ::    ![DialogItemId]         !(DialogState s (IOState s))
  56.                                             -> DialogState s (IOState s);
  57. DisableDialogItems    ::    ![DialogItemId]         !(DialogState s (IOState s))
  58.                                             -> DialogState s (IOState s);
  59. MarkCheckBoxes        ::        ![DialogItemId]     !(DialogState s (IOState s))
  60.                                             -> DialogState s (IOState s);
  61. UnmarkCheckBoxes    ::    ![DialogItemId]         !(DialogState s (IOState s))
  62.                                             -> DialogState s (IOState s);
  63. SelectDialogRadioItem::    !DialogItemId         !(DialogState s (IOState s))
  64.                                             -> DialogState s (IOState s);
  65. ChangeEditText        :: !DialogItemId !String !(DialogState s (IOState s))
  66.                                             -> DialogState s (IOState s);
  67. ChangeDynamicText    :: !DialogItemId !String !(DialogState s (IOState s))
  68.                                             -> DialogState s (IOState s);
  69. ChangeIconLook        :: !DialogItemId !IconLook !(DialogState s (IOState s))
  70.                                             -> DialogState s (IOState s);
  71.  
  72. /*    Functions to change state, look and feel (behaviour) of Controls. When the
  73.     id is not the id of a Control the functions have no effect. */
  74.  
  75. ChangeControlState    ::    !DialogItemId !ControlState !(DialogState s (IOState s))
  76.                         -> DialogState s (IOState s);
  77. ChangeControlLook    ::    !DialogItemId !ControlLook !(DialogState s (IOState s))
  78.                         -> DialogState s (IOState s);
  79. ChangeControlFeel    ::    !DialogItemId !ControlFeel !(DialogState s (IOState s))
  80.                         -> DialogState s (IOState s);
  81.  
  82. /*    Functions to change the functions related to dialog items. */
  83.  
  84. ChangeDialogFunction::    !DialogItemId !(DialogFunction s (IOState s))
  85.                     !(DialogState s (IOState s)) -> DialogState s (IOState s);
  86. ChangeButtonFunction::    !DialogItemId !(ButtonFunction s (IOState s))
  87.                     !(DialogState s (IOState s)) -> DialogState s (IOState s);
  88. ChangeSetFunction    ::    !(SetFunction s (IOState s))
  89.                     !(DialogState s (IOState s)) -> DialogState s (IOState s);
  90. ChangeResetFunction    ::    !(ResetFunction s (IOState s))
  91.                     !(DialogState s (IOState s)) -> DialogState s (IOState s);
  92.  
  93. /* DialogStateGetDialogInfo returns the DialogInfo corresponding to
  94.    the DialogState given to it. */
  95.  
  96. DialogStateGetDialogInfo :: !(DialogState s (IOState s))
  97.     -> (!DialogInfo, !DialogState s (IOState s));
  98.  
  99. /*    Functions that return the current contents of dialog items that
  100.     can be changed by the user. When the corresponding item cannot
  101.     be found a run-time error will be generated. The function
  102.     CheckBoxesMarked returns the settings of a group of CheckBoxes.
  103.     The id passed to it should be an id of such a group. The id
  104.     passed to GetSelectedRadioItemId must be eihter the id of a
  105.     DialogPopUp or the id of a group of RadioButtons. */
  106.  
  107. GetEditText                ::    !DialogItemId !DialogInfo -> String;
  108. GetSelectedRadioItemId    ::    !DialogItemId !DialogInfo -> DialogItemId;
  109. CheckBoxesMarked        ::    !DialogItemId !DialogInfo -> [(DialogItemId,Bool)];
  110. CheckBoxMarked            ::    !DialogItemId !DialogInfo -> Bool;
  111. GetControlState            ::    !DialogItemId !DialogInfo -> ControlState;
  112.  
  113. /*    ChangeDialog can be used to modify open (modeless) dialogs. */
  114.  
  115. ChangeDialog            :: !DialogId ![DialogChange s] !(IOState s) -> IOState s;
  116.